class test5:
    @staticmethod
    def add(v, ThreeDimensionalVector):
        ax = v.x+ThreeDimensionalVector.x
        ay = v.y+ThreeDimensionalVector.y
        az = v.z+ThreeDimensionalVector.z
        print("尊敬的主人，按照您的要求，向量v1+v2的计算结果为：", ax, ay, az)

    @staticmethod
    def sub(v, ThreeDimensionalVector):
        sx = v.x-ThreeDimensionalVector.x
        sy = v.y-ThreeDimensionalVector.y
        sz = v.z-ThreeDimensionalVector.z
        print(sx, sy, sz)

    @staticmethod
    def mul(ThreeDimensionalVector, a):
        mx = ThreeDimensionalVector.x*3
        my = ThreeDimensionalVector.y*3
        mz = ThreeDimensionalVector.z*3
        print(mx, my, mz)

    @staticmethod
    def div(ThreeDimensionalVector, b):
        dx = ThreeDimensionalVector.x/2
        dy = ThreeDimensionalVector.y/2
        dz = ThreeDimensionalVector.z/2
        print(dx, dy, dz)

    @staticmethod
    def lengtn(ThreeDimensionalVector):
        return pow(pow(ThreeDimensionalVector.x, 2)+pow(ThreeDimensionalVector.y, 2)+pow(ThreeDimensionalVector.z, 2), 0.5)


class ThreeDimensionalVector:
    def __init__(self, x, y, z):
        self.x = x
        self.y = y
        self.z = z


d = {}
d['v1'] = ThreeDimensionalVector(5, 6, 7)
d['v2'] = ThreeDimensionalVector(3, 4, 5)
print(d['v1'].x*3)

print("====================================")
print("欢迎使用三维运算系统")
print("1.计算v1 + v2")
print('2.计算v1 – v2')
print('3.计算v与标量相乘')
print('4.计算v与标量相除')
print('----------------------------------------------------------')
n = int(input('请输入对应的功能序号：'))
if (n == 1):
    n1 = input('请输入三维向量对象：')
    test5.add(d[n1.split(" ")[0]], d[n1.split(" ")[1]])

else:
    print("请输入正确的选项")
